package com.jdz.gxq.info.admin.training.service;

import java.util.List;
import java.util.Map;

import com.jdz.gxq.info.admin.training.bo.Training;

public interface TrainingService {
	
	/**
	 * Training检索分页用，查询记录条数
	 * @return
	 */
	public int getTrainingsCount(String enterpriseName);
	
	/**
	 * Training检索
	 * @return
	 */
	public List<Training> getTrainings(Map<String, Object> params);
	
	/**
	 * 追加Training
	 * @param training
	 */
	public void insertTraining(Training training);
	
	/**
	 * 更新Training
	 * @param training
	 */
	public void updateTraining(Training training);
	
	/**
	 * 通过id得到training
	 * @param id
	 * @return
	 */
	public Training getTrainingById(int id);
	
	/**
	 * 删除Training
	 * @param training
	 */
	public void deleteTraining(int id);
	
	/**
	 * 验证trainingName是否重复
	 * (重复返回:false)
	 * flag: 1 追加时验证
	 * flag: 2 更新时验证
	 */
	public boolean checkTrainingName(Training paramTraining, int flag);

}
